<?php include atemplate("header");?>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td align="center" bgcolor="#969696"><strong>公 告 管 理</strong></td>
  </tr>
</table>
<form action="index.php?do=news&job=add" method="post">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="40" align="right"><input type="submit" name="button3" id="button3" value="公告发布" /></td>
  </tr>
</table>
</form>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
 <tr bgcolor="#969696">
    <td width="40" align="center" valign="middle" class="STYLE7">ID</td>
    <td height="30" align="center" >标题</td>
    <td height="30" align="center" >发布时间</td>
    <td width="60" align="center" valign="middle" colspan="2" >操作</td>
 </tr>
 <?php foreach ($list as $key=>$val) {
	$key %2 == 0 ? $bgcolor = 'bgcolor="#FAFAFA"' : $bgcolor = 'bgcolor="#FFFFF7"';
 ?>
  <tr <?php echo $bgcolor;?>>
	<td width="40" align="center" valign="middle" class="STYLE7"><?php echo $val['id'];?></td>
    <td height="30" align="center" ><a href="../news.php?contentid=<?php echo $val['id'];?>" target="_blank" class="link2"><?php echo $val['title'];?></a></td>
    <td height="30" align="center" ><?php echo date('Y-m-d H:i:s',$val['posttime']);?></td>
    <td width="60" align="center" valign="middle" ><a href="index.php?do=news&job=edit&id=<?php echo $val['id'];?>">编辑</a></td>
    <td width="80" height="40" align="center" valign="middle" ><a href="index.php?do=news&job=del&id=<?php echo $val['id'];?>" onclick="return  confirm('是否真的删除此公告');">删除</a></td>
  </tr>
 <?php }?>
</table>
<?php include atemplate("footer");?>